package com.micro.ai.models.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serializable;

/**
 * 模型供应商创建请求DTO
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "模型供应商创建请求")
public class ModelVendorCreateRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "租户ID不能为空")
    @Schema(description = "租户ID", example = "tenant_001", required = true)
    private String tenantId;

    @NotBlank(message = "供应商名称不能为空")
    @Schema(description = "供应商名称", example = "OpenAI", required = true)
    private String vendorName;

    @NotBlank(message = "供应商代码不能为空")
    @Pattern(regexp = "^[a-z0-9_]+$", message = "供应商代码只能包含小写字母、数字和下划线")
    @Schema(description = "供应商代码（唯一标识符）", example = "openai", required = true)
    private String vendorCode;

    @Schema(description = "API基础URL", example = "https://api.openai.com/v1")
    private String baseUrl;

    @Schema(description = "官网地址", example = "https://openai.com")
    private String website;

    @Schema(description = "支持联系方式", example = "support@openai.com")
    private String supportContact;

    @Schema(description = "状态（active-活跃，inactive-停用）", example = "active", allowableValues = {"active", "inactive"})
    private String status;

    @Schema(description = "供应商描述", example = "OpenAI是一家专注于AI研究的公司，提供GPT系列模型")
    private String description;

    @Schema(description = "配置模板（JSON格式）", example = "{\"model\":\"gpt-4\",\"temperature\":0.7}")
    private String configTemplate;

    @Schema(description = "认证配置（JSON格式）", example = "{\"type\":\"bearer\",\"header\":\"Authorization\"}")
    private String authConfig;

    @Schema(description = "创建人ID", example = "1001")
    private String createdBy;
}

